package com.danbay.cloud.lock.device.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.danbay.cloud.lock.device.api.dto.AccessReportDto;
import com.danbay.cloud.lock.device.entity.DevicePwdInfo;

import java.util.List;

/**
 * @author yangyanchen on 2017/12/19
 *         Copyright © 2016 －2017 旦倍科技
 */
public interface DevicePwdInfoMapper extends BaseMapper<DevicePwdInfo>{

    DevicePwdInfo findByDeviceIdAndPwdAlias(AccessReportDto accessReportDto);

    List<DevicePwdInfo> findByDeviceInfo(Long deviceInfo);

    void deleteRecordsByDeviceIdAndPwdType(String deviceId,String pwdType);

    void deleteRecordsByDeviceId(String deviceId);

    void updateRecordsByDeviceIdAndPwdAlias(String deviceId,String alias,String pwdType);

    void deleteRecordByDeviceInfoId(Long deviceInfoId);

    void resetManagerPwdInfoByDeviceInfo(Long deviceInfoId);
}
